﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClothesType.aspx.cs" Inherits="School.Pages.Uniforms.ClothesType"
    MasterPageFile="~/MasterALSafa.Master"%>
<%@ Register src="~/UserControls/CampusPackage.ascx" tagname="CampusPackage" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
</asp:ScriptManager>
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
 <ContentTemplate>
    <div>
        <table align="right" dir="rtl">
        <div id="EditDiv">
           <tr>
           <td colspan="2">
               <uc1:CampusPackage ID="CampusPackage1" runat="server" />
            </td>
           <td>
           </td>
           <td>
               <asp:HiddenField ID="HFClotheId" runat="server" />
           </td>
           </tr>
           <tr>
              <td style="width: 85px" rowspan="2">
                    الكود
                </td>
              <td rowspan="2">
                    <asp:TextBox ID="txtCode" runat="server" Width="200px" MaxLength="40"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCode"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="bu">*</asp:RequiredFieldValidator>
                </td>
              <td style="width: 85px;padding-right:25px;">
                    المقاس
                </td>
              <td style="width:400px;">
              <div style="float:right;width:220px;">
               <asp:TextBox ID="txtSize" runat="server" Width="200px" MaxLength="40"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtSize"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" 
                      ValidationGroup="InsertSize">*</asp:RequiredFieldValidator>
                        </div>
              <div style="float:right;width:90px;"">
                            <asp:Button ID="btnAddSize" runat="server" Text="ادخل" 
                               CssClass="graybutton" onclick="btnAddSize_Click" Width="44px" ValidationGroup="InsertSize"/>
                        </div>
               </td>
            </tr>
           <tr>
                 <td style="width: 85px;padding-right:25px;">
                    كود المقاس
                </td>
              <td style="width:400px;">
              <div style="float:right;width:220px;">
               <asp:TextBox ID="txtSizeCode" runat="server" Width="200px" MaxLength="40"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtSizeCode"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" 
                      ValidationGroup="InsertSize">*</asp:RequiredFieldValidator>
                        </div>
                  <asp:Label ID="lblSizesMsg" runat="server"></asp:Label>
               </td>
            </tr>
           <tr>
                <td style="width: 85px">
                    الاسم
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" Width="200px" MaxLength="200"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName"
                        Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="bu">*</asp:RequiredFieldValidator>
                </td>
                <td rowspan="2" style="width: 85px;padding-right:25px;">
                المقاسات
                </td>
           <td rowspan="2">
                    <div style="float: right; width: 200px;">
                        <asp:ListBox Width="200" Height="170" ID="lstbxSizes" runat="server"></asp:ListBox>
                    </div>
                    <div style="width: 90px;margin-right:20px; float:right;">
                        <asp:Button ID="btnDeletSize" Text="حذف" runat="server" 
                           CssClass="graybutton" onclick="btnDeletSize_Click" Width="44px" />
                    </div>
                </td>
            </tr>
           <tr>
                <td style="width: 85px">
                    الوصف
                </td>
                <td>
                    <asp:TextBox ID="txtDescrptioin" TextMode="MultiLine" Height="131px" 
                        runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
           <tr>
                <td style="width: 85px">
                    &nbsp;
                </td>
                <td colspan="3" style="padding-right:25px;">
                  <asp:Button ID="btnSaveStation" runat="server" Text="اضافه"
                      CssClass="graybutton"  ValidationGroup="bu" Width="81px" onclick="btnSaveStation_Click" />
                </td>
               
            </tr>
        </div>
        <tr>
        <td>
            &nbsp;</td>
        </tr>
        <div id="DisplayDiv">
        
           <tr>
              <td colspan="4" style="color: Green">
                  <asp:Label ID="lblResult" runat="server"></asp:Label>
                </td>
            </tr>
           <tr>
              <td colspan="4">
                    <asp:GridView ID="GridView1" runat="server" Width="100%" DataKeyNames="Id"
                        AutoGenerateColumns="False" onrowcommand="GridView1_RowCommand" CssClass="Grid"
                    HeaderStyle-CssClass="GridHeaderFooter" FooterStyle-CssClass="GridHeaderFooter"
                    PagerStyle-CssClass="GridPager" 
                        AlternatingRowStyle-CssClass="GridItemAltername" AllowPaging="True" 
                        AllowSorting="True" 
                        onpageindexchanging="GridView1_PageIndexChanging">
                        <AlternatingRowStyle CssClass="GridItemAltername" />
                        <Columns>
                            <asp:BoundField DataField="Code" HeaderText="الكود"  />
                            <asp:BoundField DataField="Name" HeaderText="الاسم"  />
                            <asp:BoundField DataField="CampusName" HeaderText="المجمع" />
                            <asp:BoundField DataField="CertificateName" HeaderText="الشهاده"/>
                            <asp:BoundField DataField="StageName" HeaderText="المرحله"  />
                            <asp:BoundField DataField="GradeName" HeaderText="الصف"  />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" 
                                        CommandName="DoEdit" Text="تعديل"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                              <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" 
                                        CommandName="DoDelete" Text="حذف"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle CssClass="GridHeaderFooter" />
                        <HeaderStyle CssClass="GridHeaderFooter" />
                        <PagerStyle CssClass="GridPager" HorizontalAlign="Center" 
                            VerticalAlign="Middle" />
                    </asp:GridView>
                </td>
            </tr>
        </div>
        </table>
    </div>
    </ContentTemplate>
 </asp:UpdatePanel>
</asp:Content>
